package com.example.datadashboard.dto;

import com.example.datadashboard.enums.GenderEnum;

import lombok.Data;

/**
 * 用户传输对象
 */
@Data
public class UserDTO {
    private Long id;
    private String username;
    private String idNumber;
    private String phone;
    private String email;
    private Integer status;
    private String createTime;
    private String updateTime;
    /**
     * 性别：0-男性，1-女性
     */
    private Integer sexy;

    /**
     * 联系地址
     */
    private String address;
    /**
     * 备注
     */
    private String remark;


    /**
     * 性别描述
     * @return
     */
    public String getSexyDesc(){
        return GenderEnum.fromCode(this.sexy).getDesc();
    }
}